<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: Fisheye camera model</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a> |
<a href="#enum-members">Enumerations</a> |
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Fisheye camera model<div class="ingroups"><a class="el" href="../../d9/d0c/group__calib3d.html">Camera Calibration and 3D Reconstruction</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:d2/d14/namespacecv_1_1fisheye"><td align="right" class="memItemLeft" valign="top">  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d14/namespacecv_1_1fisheye.html">cv::fisheye</a></td></tr>
<tr class="memdesc:d2/d14/namespacecv_1_1fisheye"><td class="mdescLeft"> </td><td class="mdescRight">The methods in this namespace use a so-called fisheye camera model. <br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga26e8f7f639a5eeef7094d1b5a7935b4c"><td align="right" class="memItemLeft" valign="top">enum  </td><td class="memItemRight" valign="bottom">{ <br/>
  <a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4ca0899eaa2f96d6eed9927c4b4f4464e05">cv::fisheye::CALIB_USE_INTRINSIC_GUESS</a> = 1 &lt;&lt; 0, 
<br/>
  <a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4ca98ab6fae454ae53e5c3e731e4b5ae39a">cv::fisheye::CALIB_RECOMPUTE_EXTRINSIC</a> = 1 &lt;&lt; 1, 
<br/>
  <a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4ca4bfca5f912b78a97ed9a6b7498983b91">cv::fisheye::CALIB_CHECK_COND</a> = 1 &lt;&lt; 2, 
<br/>
  <a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4cad10382c27dd97f326b1cd01477e4db7e">cv::fisheye::CALIB_FIX_SKEW</a> = 1 &lt;&lt; 3, 
<br/>
  <a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4cab42b5b79bad18428edc607c8f5a4d8db">cv::fisheye::CALIB_FIX_K1</a> = 1 &lt;&lt; 4, 
<br/>
  <a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4ca0a4eed079d81e401bc3f3802e2ea29a0">cv::fisheye::CALIB_FIX_K2</a> = 1 &lt;&lt; 5, 
<br/>
  <a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4caf269e67db66ed6bce32b61ad2555ab20">cv::fisheye::CALIB_FIX_K3</a> = 1 &lt;&lt; 6, 
<br/>
  <a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4ca959d6c9a9c55e4d0baee9e69f32912db">cv::fisheye::CALIB_FIX_K4</a> = 1 &lt;&lt; 7, 
<br/>
  <a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4cae4ade803e9503dc58975b2156836e724">cv::fisheye::CALIB_FIX_INTRINSIC</a> = 1 &lt;&lt; 8, 
<br/>
  <a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4cab7d86700c6c4017df7501a29370279a0">cv::fisheye::CALIB_FIX_PRINCIPAL_POINT</a> = 1 &lt;&lt; 9, 
<br/>
  <a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4caae6f0aec9f8b1401ae3d8d1ff00dca87">cv::fisheye::CALIB_ZERO_DISPARITY</a> = 1 &lt;&lt; 10, 
<br/>
  <a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4ca866d9412b33303b6d6555a088531ebb9">cv::fisheye::CALIB_FIX_FOCAL_LENGTH</a> = 1 &lt;&lt; 11
<br/>
 }</td></tr>
<tr class="separator:ga26e8f7f639a5eeef7094d1b5a7935b4c"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gad626a78de2b1dae7489e152a5a5a89e1"><td align="right" class="memItemLeft" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d58/group__calib3d__fisheye.html#gad626a78de2b1dae7489e152a5a5a89e1">cv::fisheye::calibrate</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a> objectPoints, <a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a> imagePoints, const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp;image_size, <a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> K, <a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> D, <a class="el" href="../../dc/d84/group__core__basic.html#ga889a09549b98223016170d9b613715de">OutputArrayOfArrays</a> rvecs, <a class="el" href="../../dc/d84/group__core__basic.html#ga889a09549b98223016170d9b613715de">OutputArrayOfArrays</a> tvecs, int flags=0, <a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> criteria=<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a>(<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57aeb9da694ea67b3ef7d524521b580867d">TermCriteria::COUNT</a>+<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57a857609e73e7028e638d2ea649f3b45d5">TermCriteria::EPS</a>, 100, DBL_EPSILON))</td></tr>
<tr class="memdesc:gad626a78de2b1dae7489e152a5a5a89e1"><td class="mdescLeft"> </td><td class="mdescRight">Performs camera calibaration.  <a href="../../db/d58/group__calib3d__fisheye.html#gad626a78de2b1dae7489e152a5a5a89e1">More...</a><br/></td></tr>
<tr class="separator:gad626a78de2b1dae7489e152a5a5a89e1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga75d8877a98e38d0b29b6892c5f8d7765"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d58/group__calib3d__fisheye.html#ga75d8877a98e38d0b29b6892c5f8d7765">cv::fisheye::distortPoints</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> undistorted, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> distorted, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> K, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> D, double alpha=0)</td></tr>
<tr class="memdesc:ga75d8877a98e38d0b29b6892c5f8d7765"><td class="mdescLeft"> </td><td class="mdescRight">Distorts 2D points using fisheye model.  <a href="../../db/d58/group__calib3d__fisheye.html#ga75d8877a98e38d0b29b6892c5f8d7765">More...</a><br/></td></tr>
<tr class="separator:ga75d8877a98e38d0b29b6892c5f8d7765"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga384940fdf04c03e362e94b6eb9b673c9"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d58/group__calib3d__fisheye.html#ga384940fdf04c03e362e94b6eb9b673c9">cv::fisheye::estimateNewCameraMatrixForUndistortRectify</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> K, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> D, const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp;image_size, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> R, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> P, double balance=0.0, const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp;new_size=<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>(), double fov_scale=1.0)</td></tr>
<tr class="memdesc:ga384940fdf04c03e362e94b6eb9b673c9"><td class="mdescLeft"> </td><td class="mdescRight">Estimates new camera intrinsic matrix for undistortion or rectification.  <a href="../../db/d58/group__calib3d__fisheye.html#ga384940fdf04c03e362e94b6eb9b673c9">More...</a><br/></td></tr>
<tr class="separator:ga384940fdf04c03e362e94b6eb9b673c9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga0d37b45f780b32f63ed19c21aa9fd333"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d58/group__calib3d__fisheye.html#ga0d37b45f780b32f63ed19c21aa9fd333">cv::fisheye::initUndistortRectifyMap</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> K, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> D, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> R, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> P, const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">cv::Size</a> &amp;size, int m1type, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> map1, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> map2)</td></tr>
<tr class="memdesc:ga0d37b45f780b32f63ed19c21aa9fd333"><td class="mdescLeft"> </td><td class="mdescRight">Computes undistortion and rectification maps for image transform by <a class="el" href="../../da/d54/group__imgproc__transform.html#gab75ef31ce5cdfb5c44b6da5f3b908ea4" title="Applies a generic geometrical transformation to an image. ">cv::remap()</a>. If D is empty zero distortion is used, if R or P is empty identity matrixes are used.  <a href="../../db/d58/group__calib3d__fisheye.html#ga0d37b45f780b32f63ed19c21aa9fd333">More...</a><br/></td></tr>
<tr class="separator:ga0d37b45f780b32f63ed19c21aa9fd333"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gab1ad1dc30c42ee1a50ce570019baf2c4"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d58/group__calib3d__fisheye.html#gab1ad1dc30c42ee1a50ce570019baf2c4">cv::fisheye::projectPoints</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> objectPoints, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> imagePoints, const <a class="el" href="../../d0/de1/group__core.html#ga0b49177f52ed1b43e3f5a198baeee203">Affine3d</a> &amp;affine, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> K, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> D, double alpha=0, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> jacobian=<a class="el" href="../../dc/d84/group__core__basic.html#gad9287b23bba2fed753b36ef561ae7346">noArray</a>())</td></tr>
<tr class="memdesc:gab1ad1dc30c42ee1a50ce570019baf2c4"><td class="mdescLeft"> </td><td class="mdescRight">Projects points using fisheye model.  <a href="../../db/d58/group__calib3d__fisheye.html#gab1ad1dc30c42ee1a50ce570019baf2c4">More...</a><br/></td></tr>
<tr class="separator:gab1ad1dc30c42ee1a50ce570019baf2c4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga719a1b99cd5cb1fec92d0d1aedbb6841"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d58/group__calib3d__fisheye.html#ga719a1b99cd5cb1fec92d0d1aedbb6841">cv::fisheye::projectPoints</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> objectPoints, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> imagePoints, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> rvec, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> tvec, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> K, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> D, double alpha=0, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> jacobian=<a class="el" href="../../dc/d84/group__core__basic.html#gad9287b23bba2fed753b36ef561ae7346">noArray</a>())</td></tr>
<tr class="separator:ga719a1b99cd5cb1fec92d0d1aedbb6841"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gadbb3a6ca6429528ef302c784df47949b"><td align="right" class="memItemLeft" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d58/group__calib3d__fisheye.html#gadbb3a6ca6429528ef302c784df47949b">cv::fisheye::stereoCalibrate</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a> objectPoints, <a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a> imagePoints1, <a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a> imagePoints2, <a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> K1, <a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> D1, <a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> K2, <a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> D2, <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> imageSize, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> R, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> T, int flags=<a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4cae4ade803e9503dc58975b2156836e724">fisheye::CALIB_FIX_INTRINSIC</a>, <a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> criteria=<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a>(<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57aeb9da694ea67b3ef7d524521b580867d">TermCriteria::COUNT</a>+<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57a857609e73e7028e638d2ea649f3b45d5">TermCriteria::EPS</a>, 100, DBL_EPSILON))</td></tr>
<tr class="memdesc:gadbb3a6ca6429528ef302c784df47949b"><td class="mdescLeft"> </td><td class="mdescRight">Performs stereo calibration.  <a href="../../db/d58/group__calib3d__fisheye.html#gadbb3a6ca6429528ef302c784df47949b">More...</a><br/></td></tr>
<tr class="separator:gadbb3a6ca6429528ef302c784df47949b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac1af58774006689056b0f2ef1db55ecc"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d58/group__calib3d__fisheye.html#gac1af58774006689056b0f2ef1db55ecc">cv::fisheye::stereoRectify</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> K1, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> D1, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> K2, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> D2, const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp;imageSize, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> R, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> tvec, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> R1, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> R2, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> P1, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> P2, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> Q, int flags, const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp;newImageSize=<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>(), double balance=0.0, double fov_scale=1.0)</td></tr>
<tr class="memdesc:gac1af58774006689056b0f2ef1db55ecc"><td class="mdescLeft"> </td><td class="mdescRight">Stereo rectification for fisheye camera model.  <a href="../../db/d58/group__calib3d__fisheye.html#gac1af58774006689056b0f2ef1db55ecc">More...</a><br/></td></tr>
<tr class="separator:gac1af58774006689056b0f2ef1db55ecc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga167df4b00a6fd55287ba829fbf9913b9"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d58/group__calib3d__fisheye.html#ga167df4b00a6fd55287ba829fbf9913b9">cv::fisheye::undistortImage</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> distorted, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> undistorted, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> K, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> D, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> Knew=<a class="el" href="../../dc/d84/group__core__basic.html#gad9287b23bba2fed753b36ef561ae7346">cv::noArray</a>(), const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp;new_size=<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>())</td></tr>
<tr class="memdesc:ga167df4b00a6fd55287ba829fbf9913b9"><td class="mdescLeft"> </td><td class="mdescRight">Transforms an image to compensate for fisheye lens distortion.  <a href="../../db/d58/group__calib3d__fisheye.html#ga167df4b00a6fd55287ba829fbf9913b9">More...</a><br/></td></tr>
<tr class="separator:ga167df4b00a6fd55287ba829fbf9913b9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gab738cdf90ceee97b2b52b0d0e7511541"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d58/group__calib3d__fisheye.html#gab738cdf90ceee97b2b52b0d0e7511541">cv::fisheye::undistortPoints</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> distorted, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> undistorted, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> K, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> D, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> R=<a class="el" href="../../dc/d84/group__core__basic.html#gad9287b23bba2fed753b36ef561ae7346">noArray</a>(), <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> P=<a class="el" href="../../dc/d84/group__core__basic.html#gad9287b23bba2fed753b36ef561ae7346">noArray</a>())</td></tr>
<tr class="memdesc:gab738cdf90ceee97b2b52b0d0e7511541"><td class="mdescLeft"> </td><td class="mdescRight">Undistorts 2D points using fisheye model.  <a href="../../db/d58/group__calib3d__fisheye.html#gab738cdf90ceee97b2b52b0d0e7511541">More...</a><br/></td></tr>
<tr class="separator:gab738cdf90ceee97b2b52b0d0e7511541"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Definitions: Let P be a point in 3D of coordinates X in the world reference frame (stored in the matrix X) The coordinate vector of P in the camera reference frame is:</p>
<p class="formulaDsp">
\[Xc = R X + T\]
</p>
<p>where R is the rotation matrix corresponding to the rotation vector om: R = rodrigues(om); call x, y and z the 3 coordinates of Xc:</p>
<p class="formulaDsp">
\[x = Xc_1 \\ y = Xc_2 \\ z = Xc_3\]
</p>
<p>The pinhole projection coordinates of P is [a; b] where</p>
<p class="formulaDsp">
\[a = x / z \ and \ b = y / z \\ r^2 = a^2 + b^2 \\ \theta = atan(r)\]
</p>
<p>Fisheye distortion:</p>
<p class="formulaDsp">
\[\theta_d = \theta (1 + k_1 \theta^2 + k_2 \theta^4 + k_3 \theta^6 + k_4 \theta^8)\]
</p>
<p>The distorted point coordinates are [x'; y'] where</p>
<p class="formulaDsp">
\[x' = (\theta_d / r) a \\ y' = (\theta_d / r) b \]
</p>
<p>Finally, conversion into pixel coordinates: The final pixel coordinates vector [u; v] where:</p>
<p class="formulaDsp">
\[u = f_x (x' + \alpha y') + c_x \\ v = f_y y' + c_y\]
</p>
 <h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga26e8f7f639a5eeef7094d1b5a7935b4c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga26e8f7f639a5eeef7094d1b5a7935b4c">◆ </a></span>anonymous enum</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d2/d28/calib3d_8hpp.html">opencv2/calib3d.hpp</a>&gt;</code></p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga26e8f7f639a5eeef7094d1b5a7935b4ca0899eaa2f96d6eed9927c4b4f4464e05"></a>CALIB_USE_INTRINSIC_GUESS <div class="python_language">Python: cv.fisheye.CALIB_USE_INTRINSIC_GUESS</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga26e8f7f639a5eeef7094d1b5a7935b4ca98ab6fae454ae53e5c3e731e4b5ae39a"></a>CALIB_RECOMPUTE_EXTRINSIC <div class="python_language">Python: cv.fisheye.CALIB_RECOMPUTE_EXTRINSIC</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga26e8f7f639a5eeef7094d1b5a7935b4ca4bfca5f912b78a97ed9a6b7498983b91"></a>CALIB_CHECK_COND <div class="python_language">Python: cv.fisheye.CALIB_CHECK_COND</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga26e8f7f639a5eeef7094d1b5a7935b4cad10382c27dd97f326b1cd01477e4db7e"></a>CALIB_FIX_SKEW <div class="python_language">Python: cv.fisheye.CALIB_FIX_SKEW</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga26e8f7f639a5eeef7094d1b5a7935b4cab42b5b79bad18428edc607c8f5a4d8db"></a>CALIB_FIX_K1 <div class="python_language">Python: cv.fisheye.CALIB_FIX_K1</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga26e8f7f639a5eeef7094d1b5a7935b4ca0a4eed079d81e401bc3f3802e2ea29a0"></a>CALIB_FIX_K2 <div class="python_language">Python: cv.fisheye.CALIB_FIX_K2</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga26e8f7f639a5eeef7094d1b5a7935b4caf269e67db66ed6bce32b61ad2555ab20"></a>CALIB_FIX_K3 <div class="python_language">Python: cv.fisheye.CALIB_FIX_K3</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga26e8f7f639a5eeef7094d1b5a7935b4ca959d6c9a9c55e4d0baee9e69f32912db"></a>CALIB_FIX_K4 <div class="python_language">Python: cv.fisheye.CALIB_FIX_K4</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga26e8f7f639a5eeef7094d1b5a7935b4cae4ade803e9503dc58975b2156836e724"></a>CALIB_FIX_INTRINSIC <div class="python_language">Python: cv.fisheye.CALIB_FIX_INTRINSIC</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga26e8f7f639a5eeef7094d1b5a7935b4cab7d86700c6c4017df7501a29370279a0"></a>CALIB_FIX_PRINCIPAL_POINT <div class="python_language">Python: cv.fisheye.CALIB_FIX_PRINCIPAL_POINT</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga26e8f7f639a5eeef7094d1b5a7935b4caae6f0aec9f8b1401ae3d8d1ff00dca87"></a>CALIB_ZERO_DISPARITY <div class="python_language">Python: cv.fisheye.CALIB_ZERO_DISPARITY</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga26e8f7f639a5eeef7094d1b5a7935b4ca866d9412b33303b6d6555a088531ebb9"></a>CALIB_FIX_FOCAL_LENGTH <div class="python_language">Python: cv.fisheye.CALIB_FIX_FOCAL_LENGTH</div></td><td class="fielddoc"></td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="gad626a78de2b1dae7489e152a5a5a89e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad626a78de2b1dae7489e152a5a5a89e1">◆ </a></span>calibrate()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double cv::fisheye::calibrate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a> </td>
          <td class="paramname"><em>objectPoints</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a> </td>
          <td class="paramname"><em>imagePoints</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp; </td>
          <td class="paramname"><em>image_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> </td>
          <td class="paramname"><em>K</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> </td>
          <td class="paramname"><em>D</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga889a09549b98223016170d9b613715de">OutputArrayOfArrays</a> </td>
          <td class="paramname"><em>rvecs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga889a09549b98223016170d9b613715de">OutputArrayOfArrays</a> </td>
          <td class="paramname"><em>tvecs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>flags</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> </td>
          <td class="paramname"><em>criteria</em> = <code><a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a>(<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57aeb9da694ea67b3ef7d524521b580867d">TermCriteria::COUNT</a>+<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57a857609e73e7028e638d2ea649f3b45d5">TermCriteria::EPS</a>, 100, DBL_EPSILON)</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval, K, D, rvecs, tvecs</td><td>=</td><td>cv.fisheye.calibrate(</td><td class="paramname">objectPoints, imagePoints, image_size, K, D[, rvecs[, tvecs[, flags[, criteria]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d2/d28/calib3d_8hpp.html">opencv2/calib3d.hpp</a>&gt;</code></p>
<p>Performs camera calibaration. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">objectPoints</td><td>vector of vectors of calibration pattern points in the calibration pattern coordinate space. </td></tr>
    <tr><td class="paramname">imagePoints</td><td>vector of vectors of the projections of calibration pattern points. <a class="el" href="../../df/d5b/namespacecv_1_1gapi_1_1streaming.html#a0a915e69f4cc8284293e40fc9ffbf157" title="Gets dimensions from Mat. ">imagePoints.size()</a> and <a class="el" href="../../df/d5b/namespacecv_1_1gapi_1_1streaming.html#a0a915e69f4cc8284293e40fc9ffbf157" title="Gets dimensions from Mat. ">objectPoints.size()</a> and imagePoints[i].<a class="el" href="../../df/d5b/namespacecv_1_1gapi_1_1streaming.html#a0a915e69f4cc8284293e40fc9ffbf157" title="Gets dimensions from Mat. ">size()</a> must be equal to objectPoints[i].<a class="el" href="../../df/d5b/namespacecv_1_1gapi_1_1streaming.html#a0a915e69f4cc8284293e40fc9ffbf157" title="Gets dimensions from Mat. ">size()</a> for each i. </td></tr>
    <tr><td class="paramname">image_size</td><td>Size of the image used only to initialize the camera intrinsic matrix. </td></tr>
    <tr><td class="paramname">K</td><td>Output 3x3 floating-point camera intrinsic matrix \(\cameramatrix{A}\) . If <a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4ca0899eaa2f96d6eed9927c4b4f4464e05">fisheye::CALIB_USE_INTRINSIC_GUESS</a> is specified, some or all of fx, fy, cx, cy must be initialized before calling the function. </td></tr>
    <tr><td class="paramname">D</td><td>Output vector of distortion coefficients \(\distcoeffsfisheye\). </td></tr>
    <tr><td class="paramname">rvecs</td><td>Output vector of rotation vectors (see Rodrigues ) estimated for each pattern view. That is, each k-th rotation vector together with the corresponding k-th translation vector (see the next output parameter description) brings the calibration pattern from the model coordinate space (in which object points are specified) to the world coordinate space, that is, a real position of the calibration pattern in the k-th pattern view (k=0.. <em>M</em> -1). </td></tr>
    <tr><td class="paramname">tvecs</td><td>Output vector of translation vectors estimated for each pattern view. </td></tr>
    <tr><td class="paramname">flags</td><td>Different flags that may be zero or a combination of the following values:<ul>
<li><a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4ca0899eaa2f96d6eed9927c4b4f4464e05">fisheye::CALIB_USE_INTRINSIC_GUESS</a> cameraMatrix contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center ( imageSize is used), and focal distances are computed in a least-squares fashion.</li>
<li><a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4ca98ab6fae454ae53e5c3e731e4b5ae39a">fisheye::CALIB_RECOMPUTE_EXTRINSIC</a> Extrinsic will be recomputed after each iteration of intrinsic optimization.</li>
<li><a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4ca4bfca5f912b78a97ed9a6b7498983b91">fisheye::CALIB_CHECK_COND</a> The functions will check validity of condition number.</li>
<li><a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4cad10382c27dd97f326b1cd01477e4db7e">fisheye::CALIB_FIX_SKEW</a> Skew coefficient (alpha) is set to zero and stay zero.</li>
<li><a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4cab42b5b79bad18428edc607c8f5a4d8db">fisheye::CALIB_FIX_K1</a>,..., <a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4ca959d6c9a9c55e4d0baee9e69f32912db">fisheye::CALIB_FIX_K4</a> Selected distortion coefficients are set to zeros and stay zero.</li>
<li><a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4cab7d86700c6c4017df7501a29370279a0">fisheye::CALIB_FIX_PRINCIPAL_POINT</a> The principal point is not changed during the global optimization. It stays at the center or at a different location specified when <a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4ca0899eaa2f96d6eed9927c4b4f4464e05">fisheye::CALIB_USE_INTRINSIC_GUESS</a> is set too.</li>
<li><a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4ca866d9412b33303b6d6555a088531ebb9">fisheye::CALIB_FIX_FOCAL_LENGTH</a> The focal length is not changed during the global optimization. It is the \(max(width,height)/\pi\) or the provided \(f_x\), \(f_y\) when <a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4ca0899eaa2f96d6eed9927c4b4f4464e05">fisheye::CALIB_USE_INTRINSIC_GUESS</a> is set too. </li>
</ul>
</td></tr>
    <tr><td class="paramname">criteria</td><td>Termination criteria for the iterative optimization algorithm. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga75d8877a98e38d0b29b6892c5f8d7765"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga75d8877a98e38d0b29b6892c5f8d7765">◆ </a></span>distortPoints()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::fisheye::distortPoints </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>undistorted</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>distorted</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>K</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>D</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>alpha</em> = <code>0</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>distorted</td><td>=</td><td>cv.fisheye.distortPoints(</td><td class="paramname">undistorted, K, D[, distorted[, alpha]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d2/d28/calib3d_8hpp.html">opencv2/calib3d.hpp</a>&gt;</code></p>
<p>Distorts 2D points using fisheye model. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">undistorted</td><td>Array of object points, 1xN/Nx1 2-channel (or vector&lt;Point2f&gt; ), where N is the number of points in the view. </td></tr>
    <tr><td class="paramname">K</td><td>Camera intrinsic matrix \(cameramatrix{K}\). </td></tr>
    <tr><td class="paramname">D</td><td>Input vector of distortion coefficients \(\distcoeffsfisheye\). </td></tr>
    <tr><td class="paramname">alpha</td><td>The skew coefficient. </td></tr>
    <tr><td class="paramname">distorted</td><td>Output array of image points, 1xN/Nx1 2-channel, or vector&lt;Point2f&gt; .</td></tr>
  </table>
  </dd>
</dl>
<p>Note that the function assumes the camera intrinsic matrix of the undistorted points to be identity. This means if you want to transform back points undistorted with <a class="el" href="../../db/d58/group__calib3d__fisheye.html#gab738cdf90ceee97b2b52b0d0e7511541" title="Undistorts 2D points using fisheye model. ">undistortPoints()</a> you have to multiply them with \(P^{-1}\). </p>
</div>
</div>
<a id="ga384940fdf04c03e362e94b6eb9b673c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga384940fdf04c03e362e94b6eb9b673c9">◆ </a></span>estimateNewCameraMatrixForUndistortRectify()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::fisheye::estimateNewCameraMatrixForUndistortRectify </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>K</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>D</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp; </td>
          <td class="paramname"><em>image_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>R</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>balance</em> = <code>0.0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp; </td>
          <td class="paramname"><em>new_size</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>fov_scale</em> = <code>1.0</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>P</td><td>=</td><td>cv.fisheye.estimateNewCameraMatrixForUndistortRectify(</td><td class="paramname">K, D, image_size, R[, P[, balance[, new_size[, fov_scale]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d2/d28/calib3d_8hpp.html">opencv2/calib3d.hpp</a>&gt;</code></p>
<p>Estimates new camera intrinsic matrix for undistortion or rectification. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">K</td><td>Camera intrinsic matrix \(cameramatrix{K}\). </td></tr>
    <tr><td class="paramname">image_size</td><td>Size of the image </td></tr>
    <tr><td class="paramname">D</td><td>Input vector of distortion coefficients \(\distcoeffsfisheye\). </td></tr>
    <tr><td class="paramname">R</td><td>Rectification transformation in the object space: 3x3 1-channel, or vector: 3x1/1x3 1-channel or 1x1 3-channel </td></tr>
    <tr><td class="paramname">P</td><td>New camera intrinsic matrix (3x3) or new projection matrix (3x4) </td></tr>
    <tr><td class="paramname">balance</td><td>Sets the new focal length in range between the min focal length and the max focal length. Balance is in range of [0, 1]. </td></tr>
    <tr><td class="paramname">new_size</td><td>the new size </td></tr>
    <tr><td class="paramname">fov_scale</td><td>Divisor for new focal length. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga0d37b45f780b32f63ed19c21aa9fd333"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0d37b45f780b32f63ed19c21aa9fd333">◆ </a></span>initUndistortRectifyMap()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::fisheye::initUndistortRectifyMap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>K</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>D</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>R</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">cv::Size</a> &amp; </td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>m1type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>map1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>map2</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>map1, map2</td><td>=</td><td>cv.fisheye.initUndistortRectifyMap(</td><td class="paramname">K, D, R, P, size, m1type[, map1[, map2]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d2/d28/calib3d_8hpp.html">opencv2/calib3d.hpp</a>&gt;</code></p>
<p>Computes undistortion and rectification maps for image transform by <a class="el" href="../../da/d54/group__imgproc__transform.html#gab75ef31ce5cdfb5c44b6da5f3b908ea4" title="Applies a generic geometrical transformation to an image. ">cv::remap()</a>. If D is empty zero distortion is used, if R or P is empty identity matrixes are used. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">K</td><td>Camera intrinsic matrix \(cameramatrix{K}\). </td></tr>
    <tr><td class="paramname">D</td><td>Input vector of distortion coefficients \(\distcoeffsfisheye\). </td></tr>
    <tr><td class="paramname">R</td><td>Rectification transformation in the object space: 3x3 1-channel, or vector: 3x1/1x3 1-channel or 1x1 3-channel </td></tr>
    <tr><td class="paramname">P</td><td>New camera intrinsic matrix (3x3) or new projection matrix (3x4) </td></tr>
    <tr><td class="paramname">size</td><td>Undistorted image size. </td></tr>
    <tr><td class="paramname">m1type</td><td>Type of the first output map that can be CV_32FC1 or CV_16SC2 . See <a class="el" href="../../da/d54/group__imgproc__transform.html#ga9156732fa8f01be9ebd1a194f2728b7f" title="Converts image transformation maps from one representation to another. ">convertMaps()</a> for details. </td></tr>
    <tr><td class="paramname">map1</td><td>The first output map. </td></tr>
    <tr><td class="paramname">map2</td><td>The second output map. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="gab1ad1dc30c42ee1a50ce570019baf2c4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab1ad1dc30c42ee1a50ce570019baf2c4">◆ </a></span>projectPoints() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::fisheye::projectPoints </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>objectPoints</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>imagePoints</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d0/de1/group__core.html#ga0b49177f52ed1b43e3f5a198baeee203">Affine3d</a> &amp; </td>
          <td class="paramname"><em>affine</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>K</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>D</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>alpha</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>jacobian</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#gad9287b23bba2fed753b36ef561ae7346">noArray</a>()</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>imagePoints, jacobian</td><td>=</td><td>cv.fisheye.projectPoints(</td><td class="paramname">objectPoints, rvec, tvec, K, D[, imagePoints[, alpha[, jacobian]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d2/d28/calib3d_8hpp.html">opencv2/calib3d.hpp</a>&gt;</code></p>
<p>Projects points using fisheye model. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">objectPoints</td><td>Array of object points, 1xN/Nx1 3-channel (or vector&lt;Point3f&gt; ), where N is the number of points in the view. </td></tr>
    <tr><td class="paramname">imagePoints</td><td>Output array of image points, 2xN/Nx2 1-channel or 1xN/Nx1 2-channel, or vector&lt;Point2f&gt;. </td></tr>
    <tr><td class="paramname">affine</td><td></td></tr>
    <tr><td class="paramname">K</td><td>Camera intrinsic matrix \(cameramatrix{K}\). </td></tr>
    <tr><td class="paramname">D</td><td>Input vector of distortion coefficients \(\distcoeffsfisheye\). </td></tr>
    <tr><td class="paramname">alpha</td><td>The skew coefficient. </td></tr>
    <tr><td class="paramname">jacobian</td><td>Optional output 2Nx15 jacobian matrix of derivatives of image points with respect to components of the focal lengths, coordinates of the principal point, distortion coefficients, rotation vector, translation vector, and the skew. In the old interface different components of the jacobian are returned via different output parameters.</td></tr>
  </table>
  </dd>
</dl>
<p>The function computes projections of 3D points to the image plane given intrinsic and extrinsic camera parameters. Optionally, the function computes Jacobians - matrices of partial derivatives of image points coordinates (as functions of all the input parameters) with respect to the particular parameters, intrinsic and/or extrinsic. </p>
</div>
</div>
<a id="ga719a1b99cd5cb1fec92d0d1aedbb6841"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga719a1b99cd5cb1fec92d0d1aedbb6841">◆ </a></span>projectPoints() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::fisheye::projectPoints </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>objectPoints</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>imagePoints</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>rvec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>tvec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>K</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>D</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>alpha</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>jacobian</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#gad9287b23bba2fed753b36ef561ae7346">noArray</a>()</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>imagePoints, jacobian</td><td>=</td><td>cv.fisheye.projectPoints(</td><td class="paramname">objectPoints, rvec, tvec, K, D[, imagePoints[, alpha[, jacobian]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d2/d28/calib3d_8hpp.html">opencv2/calib3d.hpp</a>&gt;</code></p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
</div>
</div>
<a id="gadbb3a6ca6429528ef302c784df47949b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadbb3a6ca6429528ef302c784df47949b">◆ </a></span>stereoCalibrate()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double cv::fisheye::stereoCalibrate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a> </td>
          <td class="paramname"><em>objectPoints</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a> </td>
          <td class="paramname"><em>imagePoints1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a> </td>
          <td class="paramname"><em>imagePoints2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> </td>
          <td class="paramname"><em>K1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> </td>
          <td class="paramname"><em>D1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> </td>
          <td class="paramname"><em>K2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaf77c9a14ef956c50c1efd4547f444e63">InputOutputArray</a> </td>
          <td class="paramname"><em>D2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> </td>
          <td class="paramname"><em>imageSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>R</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>T</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>flags</em> = <code><a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4cae4ade803e9503dc58975b2156836e724">fisheye::CALIB_FIX_INTRINSIC</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a> </td>
          <td class="paramname"><em>criteria</em> = <code><a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html">TermCriteria</a>(<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57aeb9da694ea67b3ef7d524521b580867d">TermCriteria::COUNT</a>+<a class="el" href="../../d9/d5d/classcv_1_1TermCriteria.html#a56fecdc291ccaba8aad27d67ccf72c57a857609e73e7028e638d2ea649f3b45d5">TermCriteria::EPS</a>, 100, DBL_EPSILON)</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval, K1, D1, K2, D2, R, T</td><td>=</td><td>cv.fisheye.stereoCalibrate(</td><td class="paramname">objectPoints, imagePoints1, imagePoints2, K1, D1, K2, D2, imageSize[, R[, T[, flags[, criteria]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d2/d28/calib3d_8hpp.html">opencv2/calib3d.hpp</a>&gt;</code></p>
<p>Performs stereo calibration. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">objectPoints</td><td>Vector of vectors of the calibration pattern points. </td></tr>
    <tr><td class="paramname">imagePoints1</td><td>Vector of vectors of the projections of the calibration pattern points, observed by the first camera. </td></tr>
    <tr><td class="paramname">imagePoints2</td><td>Vector of vectors of the projections of the calibration pattern points, observed by the second camera. </td></tr>
    <tr><td class="paramname">K1</td><td>Input/output first camera intrinsic matrix: \(\vecthreethree{f_x^{(j)}}{0}{c_x^{(j)}}{0}{f_y^{(j)}}{c_y^{(j)}}{0}{0}{1}\) , \(j = 0,\, 1\) . If any of <a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4ca0899eaa2f96d6eed9927c4b4f4464e05">fisheye::CALIB_USE_INTRINSIC_GUESS</a> , <a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4cae4ade803e9503dc58975b2156836e724">fisheye::CALIB_FIX_INTRINSIC</a> are specified, some or all of the matrix components must be initialized. </td></tr>
    <tr><td class="paramname">D1</td><td>Input/output vector of distortion coefficients \(\distcoeffsfisheye\) of 4 elements. </td></tr>
    <tr><td class="paramname">K2</td><td>Input/output second camera intrinsic matrix. The parameter is similar to K1 . </td></tr>
    <tr><td class="paramname">D2</td><td>Input/output lens distortion coefficients for the second camera. The parameter is similar to D1 . </td></tr>
    <tr><td class="paramname">imageSize</td><td>Size of the image used only to initialize camera intrinsic matrix. </td></tr>
    <tr><td class="paramname">R</td><td>Output rotation matrix between the 1st and the 2nd camera coordinate systems. </td></tr>
    <tr><td class="paramname">T</td><td>Output translation vector between the coordinate systems of the cameras. </td></tr>
    <tr><td class="paramname">flags</td><td>Different flags that may be zero or a combination of the following values:<ul>
<li><a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4cae4ade803e9503dc58975b2156836e724">fisheye::CALIB_FIX_INTRINSIC</a> Fix K1, K2? and D1, D2? so that only R, T matrices are estimated.</li>
<li><a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4ca0899eaa2f96d6eed9927c4b4f4464e05">fisheye::CALIB_USE_INTRINSIC_GUESS</a> K1, K2 contains valid initial values of fx, fy, cx, cy that are optimized further. Otherwise, (cx, cy) is initially set to the image center (imageSize is used), and focal distances are computed in a least-squares fashion.</li>
<li><a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4ca98ab6fae454ae53e5c3e731e4b5ae39a">fisheye::CALIB_RECOMPUTE_EXTRINSIC</a> Extrinsic will be recomputed after each iteration of intrinsic optimization.</li>
<li><a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4ca4bfca5f912b78a97ed9a6b7498983b91">fisheye::CALIB_CHECK_COND</a> The functions will check validity of condition number.</li>
<li><a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4cad10382c27dd97f326b1cd01477e4db7e">fisheye::CALIB_FIX_SKEW</a> Skew coefficient (alpha) is set to zero and stay zero.</li>
<li><a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4cab42b5b79bad18428edc607c8f5a4d8db">fisheye::CALIB_FIX_K1</a>,..., <a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4ca959d6c9a9c55e4d0baee9e69f32912db">fisheye::CALIB_FIX_K4</a> Selected distortion coefficients are set to zeros and stay zero. </li>
</ul>
</td></tr>
    <tr><td class="paramname">criteria</td><td>Termination criteria for the iterative optimization algorithm. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="gac1af58774006689056b0f2ef1db55ecc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac1af58774006689056b0f2ef1db55ecc">◆ </a></span>stereoRectify()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::fisheye::stereoRectify </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>K1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>D1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>K2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>D2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp; </td>
          <td class="paramname"><em>imageSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>R</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>tvec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>R1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>R2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>P1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>P2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>Q</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp; </td>
          <td class="paramname"><em>newImageSize</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>balance</em> = <code>0.0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>fov_scale</em> = <code>1.0</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>R1, R2, P1, P2, Q</td><td>=</td><td>cv.fisheye.stereoRectify(</td><td class="paramname">K1, D1, K2, D2, imageSize, R, tvec, flags[, R1[, R2[, P1[, P2[, Q[, newImageSize[, balance[, fov_scale]]]]]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d2/d28/calib3d_8hpp.html">opencv2/calib3d.hpp</a>&gt;</code></p>
<p>Stereo rectification for fisheye camera model. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">K1</td><td>First camera intrinsic matrix. </td></tr>
    <tr><td class="paramname">D1</td><td>First camera distortion parameters. </td></tr>
    <tr><td class="paramname">K2</td><td>Second camera intrinsic matrix. </td></tr>
    <tr><td class="paramname">D2</td><td>Second camera distortion parameters. </td></tr>
    <tr><td class="paramname">imageSize</td><td>Size of the image used for stereo calibration. </td></tr>
    <tr><td class="paramname">R</td><td>Rotation matrix between the coordinate systems of the first and the second cameras. </td></tr>
    <tr><td class="paramname">tvec</td><td>Translation vector between coordinate systems of the cameras. </td></tr>
    <tr><td class="paramname">R1</td><td>Output 3x3 rectification transform (rotation matrix) for the first camera. </td></tr>
    <tr><td class="paramname">R2</td><td>Output 3x3 rectification transform (rotation matrix) for the second camera. </td></tr>
    <tr><td class="paramname">P1</td><td>Output 3x4 projection matrix in the new (rectified) coordinate systems for the first camera. </td></tr>
    <tr><td class="paramname">P2</td><td>Output 3x4 projection matrix in the new (rectified) coordinate systems for the second camera. </td></tr>
    <tr><td class="paramname">Q</td><td>Output \(4 \times 4\) disparity-to-depth mapping matrix (see reprojectImageTo3D ). </td></tr>
    <tr><td class="paramname">flags</td><td>Operation flags that may be zero or <a class="el" href="../../db/d58/group__calib3d__fisheye.html#gga26e8f7f639a5eeef7094d1b5a7935b4caae6f0aec9f8b1401ae3d8d1ff00dca87">fisheye::CALIB_ZERO_DISPARITY</a> . If the flag is set, the function makes the principal points of each camera have the same pixel coordinates in the rectified views. And if the flag is not set, the function may still shift the images in the horizontal or vertical direction (depending on the orientation of epipolar lines) to maximize the useful image area. </td></tr>
    <tr><td class="paramname">newImageSize</td><td>New image resolution after rectification. The same size should be passed to initUndistortRectifyMap (see the stereo_calib.cpp sample in OpenCV samples directory). When (0,0) is passed (default), it is set to the original imageSize . Setting it to larger value can help you preserve details in the original image, especially when there is a big radial distortion. </td></tr>
    <tr><td class="paramname">balance</td><td>Sets the new focal length in range between the min focal length and the max focal length. Balance is in range of [0, 1]. </td></tr>
    <tr><td class="paramname">fov_scale</td><td>Divisor for new focal length. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga167df4b00a6fd55287ba829fbf9913b9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga167df4b00a6fd55287ba829fbf9913b9">◆ </a></span>undistortImage()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::fisheye::undistortImage </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>distorted</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>undistorted</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>K</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>D</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>Knew</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#gad9287b23bba2fed753b36ef561ae7346">cv::noArray</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp; </td>
          <td class="paramname"><em>new_size</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>()</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>undistorted</td><td>=</td><td>cv.fisheye.undistortImage(</td><td class="paramname">distorted, K, D[, undistorted[, Knew[, new_size]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d2/d28/calib3d_8hpp.html">opencv2/calib3d.hpp</a>&gt;</code></p>
<p>Transforms an image to compensate for fisheye lens distortion. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">distorted</td><td>image with fisheye lens distortion. </td></tr>
    <tr><td class="paramname">undistorted</td><td>Output image with compensated fisheye lens distortion. </td></tr>
    <tr><td class="paramname">K</td><td>Camera intrinsic matrix \(cameramatrix{K}\). </td></tr>
    <tr><td class="paramname">D</td><td>Input vector of distortion coefficients \(\distcoeffsfisheye\). </td></tr>
    <tr><td class="paramname">Knew</td><td>Camera intrinsic matrix of the distorted image. By default, it is the identity matrix but you may additionally scale and shift the result by using a different matrix. </td></tr>
    <tr><td class="paramname">new_size</td><td>the new size</td></tr>
  </table>
  </dd>
</dl>
<p>The function transforms an image to compensate radial and tangential lens distortion.</p>
<p>The function is simply a combination of <a class="el" href="../../db/d58/group__calib3d__fisheye.html#ga0d37b45f780b32f63ed19c21aa9fd333" title="Computes undistortion and rectification maps for image transform by cv::remap(). If D is empty zero d...">fisheye::initUndistortRectifyMap</a> (with unity R ) and remap (with bilinear interpolation). See the former function for details of the transformation being performed.</p>
<p>See below the results of undistortImage.</p><ul>
<li>a) result of undistort of perspective camera model (all possible coefficients (k_1, k_2, k_3, k_4, k_5, k_6) of distortion were optimized under calibration)<ul>
<li>b) result of <a class="el" href="../../db/d58/group__calib3d__fisheye.html#ga167df4b00a6fd55287ba829fbf9913b9" title="Transforms an image to compensate for fisheye lens distortion. ">fisheye::undistortImage</a> of fisheye camera model (all possible coefficients (k_1, k_2, k_3, k_4) of fisheye distortion were optimized under calibration)</li>
<li>c) original image was captured with fisheye lens</li>
</ul>
</li>
</ul>
<p>Pictures a) and b) almost the same. But if we consider points of image located far from the center of image, we can notice that on image a) these points are distorted.</p>
<div class="image">
<img alt="fisheye_undistorted.jpg" src="../../fisheye_undistorted.jpg"/>
<div class="caption">
image</div></div>
</div>
</div>
<a id="gab738cdf90ceee97b2b52b0d0e7511541"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab738cdf90ceee97b2b52b0d0e7511541">◆ </a></span>undistortPoints()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::fisheye::undistortPoints </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>distorted</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>undistorted</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>K</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>D</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>R</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#gad9287b23bba2fed753b36ef561ae7346">noArray</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>P</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#gad9287b23bba2fed753b36ef561ae7346">noArray</a>()</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>undistorted</td><td>=</td><td>cv.fisheye.undistortPoints(</td><td class="paramname">distorted, K, D[, undistorted[, R[, P]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d2/d28/calib3d_8hpp.html">opencv2/calib3d.hpp</a>&gt;</code></p>
<p>Undistorts 2D points using fisheye model. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">distorted</td><td>Array of object points, 1xN/Nx1 2-channel (or vector&lt;Point2f&gt; ), where N is the number of points in the view. </td></tr>
    <tr><td class="paramname">K</td><td>Camera intrinsic matrix \(cameramatrix{K}\). </td></tr>
    <tr><td class="paramname">D</td><td>Input vector of distortion coefficients \(\distcoeffsfisheye\). </td></tr>
    <tr><td class="paramname">R</td><td>Rectification transformation in the object space: 3x3 1-channel, or vector: 3x1/1x3 1-channel or 1x1 3-channel </td></tr>
    <tr><td class="paramname">P</td><td>New camera intrinsic matrix (3x3) or new projection matrix (3x4) </td></tr>
    <tr><td class="paramname">undistorted</td><td>Output array of image points, 1xN/Nx1 2-channel, or vector&lt;Point2f&gt; . </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:41 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
